package chat;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

/**
* Cliente
*
* @author Nara, Nelson e Lucas Trombeta
*/
public class Cliente {
	public static CadastroService cadastroServ;
	public static LoginService loginServ;
	public static ConsultarSalaService consultarSalaServ;

	public static void main(String[] args) {

		try {
			cadastroServ = (CadastroService) Naming.lookup("rmi://localhost/Cadastro");
			loginServ = (LoginService) Naming.lookup("rmi://localhost/Login");
            consultarSalaServ = (ConsultarSalaService) Naming.lookup("rmi://localhost/ConsultarSala");     
		
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (RemoteException e) {
			e.printStackTrace();
		} catch (NotBoundException e) {
			e.printStackTrace();
		}

		LoginFrame loginFrame = new LoginFrame();
		loginFrame.setVisible(true);
	}

}
